
<template>
    <view>
		<view class="nav">
		   <navigator url="../shop"><view class="all">全部</view></navigator>
		   <navigator url="../tong/tong"><view class="tong"><img src="../../../static/7_03.gif" alt=""><span>桶装水</span></view></navigator>
		   <navigator url="../ping/ping"><view class="ping"><img src="../../../static/7_05.gif" alt=""><span>瓶装水</span></view></navigator>
		   <navigator url="../drink/drink"><view class="drink"><img src="../../../static/7_07.gif" alt=""><span>饮用机</span></view></navigator>
        </view>
		
		<navigator url="../xiangqing" hover-class="navigator-hover">
			<view class="mes"  v-for="(item,index) in datas" :key="index">
				<img :src="item.goodsImgList[0].url" alt="">
				<view class="right">
					<p class="p2">{{item.goodsName}}</p>
					<p class="p3">富含矿物质，富含矿物质</p>
					<p class="p4">￥{{item.goodsPrice}}</p>
					<!-- <span class="span1">单件￥20</span> -->
					<P class="p5">{{item.goodsBrandName}}</P>
					<span class="span2">{{item.goodsCommentnum}}条评价 {{item.feedback}}好评</span>
				</view>
			</view>
		</navigator>
	   <footer></footer>
	</view>
</template>

<script>
	  export default{
	  		data() {
	  			return {
	  				datas:[]
	  				
	  			}
	  		},
			 onUnload: function () {
										wx.reLaunch({
										 url: '../shop'
										})
									  },
	  		onLoad(){
				
// 	  			     uni.showTabBar({
// 						 fail(err) {
// 						 	console.log(err)
// 						 },
// 	  			     	complete() {
// 	  			     		console.log(23232)
// 	  			     	}
// 	  			     });
	  				uni.request({
	  						url:'http://192.144.170.210/maishui/goods/selectAllGoods',
	  						method:'POST',
							data:{
								goodsType:"12321312312313"
							},
	  						header:{
	  							
	  							'content-type': 'application/json',
	  						},
	  						success: (res) => {
	  							console.log("成功");
	  							console.log(res);
	  							this.text = 'request success';
	  							this.datas = res.data.data;
	  							
								if(this.datas.goodsType = 1){
									console.log(this.datas);
								}
	  							
	  							
	  				},
	  				
	  				fail:err=>{
	  					console.log(err);
	  				},
	  				complete:()=>{}
	  					});	
	  					
	  			
	  		},
	  // 		onLoad(){
	  // 			const ship = uni.request({
	  // 				url:'http://192.144.170.210/maishui/goods/selectAllGoods',
	  // 				method:'POST',
	  // 				success:function(res){
	  // 					console.log(res.data);
	  // 				}
	  // 			})
	  // 		}
	  	}              
	  		
</script>

<style>
		*{
			box-sizing: border-box;
			}
	.nav{
		display: flex;
		justify-content:space-around;
		left: 0px;
		top: 67px;
		width: 100%;
		height: 39px;
		line-height: 20px;
		text-align: center;
		border-bottom:1px solid #eee;
	}
	.nav img{
		/* s */
		width: 23px;
		height: 23px;
		/* margin-top:4px; */

		
	}
	.all{
		left: 21px;
		top: 75px;
		width: 82px;
		height: 28px;
		line-height: 20px;
		color: rgba(34, 34, 34, 1);
		font-size: 14px;
		text-align: center;
		font-family: PingFangSC-regular;	
		margin-top: 10px;
		

	}
	.tong{
		left: 109px;
		width: 82px;
		height: 29px;
		color: rgba(16, 16, 16, 1);
		font-size: 14px;
		text-align: left;
		font-family: PingFangSC-regular;
		margin-top: 10px;
		border-bottom: 1px solid #32A1D9;

	}
	.tong span{
		display: block;
		margin-left: 20px;
		margin-top: -25px;
	}
	.ping span{
		display: block;
		margin-left: 23px;
		margin-top: -25px;
	}
	.drink span{
		display: block;
		margin-left: 23px;
		margin-top: -25px;
	}
	.ping{
		left: 109px;
		top: 77px;
		width: 82px;
		height: 20px;
		color: rgba(16, 16, 16, 1);
		font-size: 14px;
		text-align: left;
		font-family: PingFangSC-regular;
		margin-top: 10px;

	}
	.drink{
		left: 311px;
		top: 77px;
		width: 82px;
		height: 20px;
		color: rgba(16, 16, 16, 1);
		font-size: 14px;
		text-align: left;
		font-family: PingFangSC-regular;
		margin-top: 10px;

	}
	.mes{
		margin-top:20px;
		display: flex;
		
	}
	.mes img {
	
		margin-left: 1.08rem;
		margin-top:1.08rem;
		width: 4.8rem;
		height: 4.8rem;
		border-radius: 0.3rem;
		/* margin: auto; */
	}
	.mes .right{
		margin-left: 1rem;
		float: right;
		border-bottom:1px solid #eee;
	}
	
	.mes .right img{
		left: 8.8rem;
		top: 8rem;
		width: 1.56rem;
		height: 0.75rem;
	
	}
	.mes .right .p1{
		left: 10.56rem;
		top: 7.8rem;	
		width: 7.8rem;
		height: 1.2rem;
		line-height: 1.06rem;
		color: rgba(187, 187, 187, 1);
		font-size: 12px;
		text-align: left;
		font-family: PingFangSC-regular;
	
	}
	.mes .right .p2{
		left: 8.88rem;
		top: 8.88rem;
		width: 14.31rem;
		height: 2.81rem;
		line-height: 1.37rem;
		color: rgba(16, 16, 16, 1);
		font-size: 15px;
		text-align: left;
		font-family: PingFangSC-regular;
	
	}
	.mes .right .p3{
		left: 8.93rem;
		top: 11.69rem;
		width: 8.56rem;
		height: 1rem;
		line-height: 1rem;
		color: rgba(171, 171, 171, 1);
		font-size: 11px;
		text-align: left;
		font-family: PingFangSC-regular;
	
	}
	.mes .right .p4{
	    left: 8.75rem;
		top: 12.69rem;
		width: 3.31rem;
		height: 1.63rem;
		line-height: 1.63rem;
		color: rgba(59, 156, 219, 1);
		font-size: 18px;
		text-align: left;
		font-family: PingFangSC-regular;
	
	}
	.mes .right .span1{
		left: 11.56rem;
		top: 9.81rem;
		width: 3.5rem;
		height: 1rem;
		line-height: 1rem;
		color: rgba(171, 171, 171, 1);
		font-size: 11px;
		text-align: left;
		font-family: PingFangSC-regular;
		border-left: 1px soild #eee;
		float:right;
		margin-top:-1.25rem;
		margin-right:7.81rem;
		
	}
	.mes .right .p5{
		left: 9.25rem;
		top: 14.37rem;
		width: 1.69rem;
		height: 1rem;
		text-align: center;
		line-height: 1rem;
		color: rgba(59, 156, 219, 1);
		font-size: 11px;
		text-align: left;
		font-family: PingFangSC-regular;
		border:1px solid #3B9CDB;
		margni-left:0.7rem;
	
	}
	.mes .right .span2{
		left: 11.31rem;
		top: 14.38rem;
		width: 9.44rem;
		height: 1rem;
		line-height: 1rem;
		color: rgba(171, 171, 171, 1);
		font-size: 11px;
		text-align: left;
		font-family: PingFangSC-regular;
		margin-top:-0.94rem;
		margin-right: 2.19rem;
		float: right;
	}
</style>

